package com.itheima.reggie;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.client.RestTemplate;

/**
 * @author Lff
 * @date 2022/2/25
 */
@SpringBootApplication
//开启Web原始注解扫描
@ServletComponentScan
//开启注解式事务
@EnableTransactionManagement
//开启注解式缓存支持
@EnableCaching
public class ReggieApp {
    public static void main(String[] args) {
        SpringApplication.run(ReggieApp.class, args);
    }

    @Bean
    public RestTemplate restTemplate() {
        RestTemplate restTemplate = new RestTemplate();
        return restTemplate;
    }
}
